package com.repast.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.repast.common.ServerResponse;
import com.repast.dao.OrderProcessMapper;
import com.repast.pojo.OrderProcess;

@Service
public class OrderProcessServiceImpl implements IOrderProcessService {
	
	@Autowired
	private OrderProcessMapper processMapper;
	
	public ServerResponse selectProcessByOrdersId(Integer ordersId) {
		PageHelper.orderBy("orders_status_time asc");
		List<OrderProcess> list = processMapper.selectProcessByOrdersId(ordersId);
		PageInfo pageInfo = new PageInfo(list);
		return ServerResponse.createBySuccess(pageInfo);
	}

}
